<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="UTF-8"%>
<%@ page import=" com.sfxy.form.*" %>
<%@ page import="com.sfxy.dao.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>指导教师详细信息</title>
	<style type="text/css">
    
	<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	
	width:806px; height:600px;
}
.STYLE1{
	font-family: "新宋体";
	color: #660033;
	font-size: 12px;
}

-->
    </style></head>
 <jsp:useBean id="pageset" class="com.sfxy.tool.PageSet" scope="session"></jsp:useBean> 
 <jsp:useBean id="suttdao" class="com.sfxy.dao.SubjectDao"  scope="session"></jsp:useBean>
 <%
 	String username=(String)session.getAttribute("logid");//获得登录时账号
	StudentDao studao=new StudentDao();
	StudentForm stf=studao.queryStudentForm(Integer.parseInt(username));
	int sudi=stf.getSbujectId();
	SubjectForm ssf=suttdao.exquerySubject(sudi);
  %>
  <body>
 <form name="stfff" >
 <table width="796" cellspacing="1" cellpadding="3" bordercolor="#660000" border="5" background="images/back_r2_c2.jpg" class="STYLE1">
 <tr><td colspan="7">
 	<%		
 	 if(String.valueOf(stf.getTeacherId()).equals("0")){
 			out.print("<p align=center><img src=images/icon.gif width=10 height=10 >&nbsp;&nbsp;<strong>您还没有选择指导教师!</strong></p>");
 			
 			}else{
 			out.print("<p align=center><img src=images/icon.gif width=10 height=10 >&nbsp;&nbsp;<strong>详细信息</strong></p>");
 			}
 	 %> </td> 
 	 <td align="right"><input type="button"name="returnmain" align="right" value="返回主页" onclick="javascript:location.href='MyJsp.jsp'; " /> </td>
    </tr> 
    <%
   if(!String.valueOf(stf.getTeacherId()).equals("0")) {
   	 String stamps=ssf.getStamp();
			if(stamps.equals("a"))stamps="";
			if(stamps.equals("b"))stamps="C++系统";
			if(stamps.equals("c"))stamps="java系统";
     %>
    <tr> 
      <td height="30" width="74"><strong>教师编号</strong></td> 
      <td width="74"><strong>教师姓名</strong></td> 
      <td width="74"><strong>题目编号</strong></td> 
      <td width="74"><strong>题目名称</strong></td> 
       <td width="74"><strong>题目类型</strong></td> 
      <td width="278" align="center"><strong>题目说明</strong></td> 
      <td width="74"><strong>学生编号</strong></td> 
      <td width="74"><strong>学生姓名</strong></td> 
     
    </tr>
    <tr> 
      <td><%=ssf.getTeacherId() %>   </td> 
      <td><%=ssf.getName() %></td> 
      <td><%=ssf.getSubjectId() %>  </td> 	 
      <td><%=ssf.getTitle() %></td> 
      <td><%= stamps%></td>
      <td><%=ssf.getIntroduce() %></td> 
      <td><%=ssf.getStudentId() %>  </td> 
      <td><%=ssf.getStname() %>  </td> 
    </tr> 
    <%} %>
  </table>
 </form>
  </body>
</html>
